package com.leetcode.common;

/**
 * 二叉树的模型类
 *
 * @author fy
 * @date 2022/4/12 19:37
 */
public class TreeNode {
    public int val;
    public TreeNode left;
    public TreeNode right;

    public TreeNode() {
    }

    public TreeNode(int val) {
        this.val = val;
    }

    public TreeNode(int val, TreeNode left, TreeNode right) {
        this.val = val;
        this.left = left;
        this.right = right;
    }
}
/* *** 力扣TreeNode定义 ***/
/**
 *     public class TreeNode {
 *         int val;
 *         TreeNode left;
 *         TreeNode right;
 *
 *         TreeNode() {
 *         }
 *
 *         TreeNode(int val) {
 *             this.val = val;
 *         }
 *
 *         TreeNode(int val, TreeNode left, TreeNode right) {
 *             this.val = val;
 *             this.left = left;
 *             this.right = right;
 *         }
 *     }
 */